The present invention relates to reducing virtual machine pre-emption and, more specifically, to a method for reducing virtual machine pre-emption in a virtualized environment.
Multiprocessing computing systems are often built as a set of similar processors all using the same physical memory. This arrangement is generally referred to as symmetric multiprocessing (SMP). An operating system running on such hardware system uses the processors in tandem to run the aggregate work of the system. For example, when the operating system is a Linux system, the Linux kernel dispatches user execution contexts, called processes, on the real processors of the system. Similarly, when the operating system is a z/VM® system, the z/VM® kernel dispatches its execution contexts, called virtual processors, on the real processors of the system. Windows®, another multiprocessor-capable processor operating system, operates similarly with its processes and processors. (z/VM® is a registered trademark of International Business Machines Corporation, of Armonk, N.Y., USA, and Windows® is a registered trademark of Microsoft Corporation, of Redmond, Wash., USA.)
In operating systems such as Linux, z/VM®, or Windows®, processor time is consumed either by user application execution contexts or by the operating system kernel. Such consumption is interleaved. The typical behavior is that a user process will first run for a period of time thus accruing processor time. Then, the user process will perform an operation or invoke an application programming interface (API) that will require the operating system kernel to intervene. The kernel intervenes to handle the condition, and it runs for a period of time, thus accruing processor time. When the kernel finishes handling the condition, the kernel returns control to the user application process.
Generally, the operating system kernel having to intervene requires the kernel to obtain serialization or mutual exclusion before handling the request. Such protection is required to assure that only one thread or processor at a time reads or updates the accessed kernel data structure(s). While lightweight serialization techniques are available in the literature, ultimately, all such techniques accomplish the same thing, namely, one-at-a-time access to these key data structure(s). The serial access is required to assure system integrity.